package com.atguigu.srb.core.service;

import com.atguigu.srb.core.pojo.entity.UserInfo;
import com.atguigu.srb.core.pojo.entity.vo.LoginVO;
import com.atguigu.srb.core.pojo.entity.vo.RegisterVO;
import com.atguigu.srb.core.pojo.entity.vo.UserInfoIndexVO;
import com.atguigu.srb.core.pojo.entity.vo.UserInfoSearchVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * <p>
 * 用户基本信息 服务类
 * </p>
 *
 * @author Atguigu
 * @since 2023-05-26
 */
public interface UserInfoService extends IService<UserInfo> {

    void saveUser(RegisterVO registerVO);

    String login(LoginVO loginVO, HttpServletRequest request);

    String wxLogin(HttpSession session);

    String callback(String code, String state, HttpServletRequest request, HttpSession session);

    Page<UserInfo> searchUserInfos(Integer pageNum, Integer pageSize, UserInfoSearchVO userInfoSearchVO);

    UserInfoIndexVO getUserInfoIndexVO(String token);

    UserInfo updateUserInfo(String token, String mobile, Integer userType);

    UserInfo checkAccount(String token);
    UserInfo checkAccount(Long id);
}
